//Lindsay Ergenekan 
//ergenekl@onid.oregonstate.edu
////cs311-400
//Homework5
//shared references with Emma Paul, Used a lot of stackoverflow.com, gnu.co, etc
//It was a good time


#ifndef HEADER_FILE
#define HEADER_FILE

#define _GNU_SOURCE
#define _POSIX_SOURCE
#define _BSD_SOURCE

#include <ctype.h> 
#include <errno.h> 
#include <utime.h> 
#include <dirent.h> 
#include <ar.h> 
#include <string.h>
#include <fcntl.h> 
#include <stdio.h> 
#include <getopt.h> 
#include <time.h> 
#include <stdlib.h>
#include <unistd.h>
#include <sys/utsname.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <string.h>
#include <stdarg.h>
#include <sys/wait.h>
#include <limits.h>
#include <sys/wait.h>
//#include <sys/msg.h>
#include <search.h>
#include <sys/ipc.h>
#include <sys/msg.h>
#include <math.h>
#include <pthread.h>
#include <sys/mman.h>
#include <semaphore.h>
#include <limits.h> 


typedef struct thread_info{
	unsigned char * bitMAP;
	unsigned int up_to_num;
} thread_info;

typedef struct shm_buf{
	sem_t sem;
	unsigned char *map;
} shm_buf;

void * sieve(void *arg); //sieve of eresothemenes
pthread_mutex_t lock; ///mutex variable

int shmem_fd; //global for easy closing

void *mount_shmem(char *path, int object_size);

#endif